﻿<%@ Page Title="Create Variant &raquo; ResourceBlender.NET" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="CreateVariant.aspx.cs" Inherits="CreateVariant" %>

<asp:Content ID="cntHead" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="cntMain" ContentPlaceHolderID="cntMain" Runat="Server">
    <h1>Create Variant of Existing Language</h1>
    <div class="breadcrumbs">
        <asp:HyperLink ID="lnkNavHome" runat="server" NavigateUrl="~/Default.aspx">ResourceBlender.NET</asp:HyperLink> &gt; <asp:HyperLink ID="lnkNavResources" runat="server" NavigateUrl="~/Resources.aspx">Resources</asp:HyperLink> &gt; Create Variant of Existing Language
    </div>
    <div class="niceform">
        <asp:MultiView ID="mltMain" runat="server" ActiveViewIndex="0">
            <asp:View ID="viwNoApps" runat="server">
                <p>You must <asp:HyperLink ID="lnkAddApplication" runat="server" Text="add an application" NavigateUrl="~/Applications.aspx">add an application</asp:HyperLink> and some resources before copying a language.</p>
            </asp:View>
            <asp:View ID="viwStartCopy" runat="server">
                <p><asp:Literal ID="litPageDescription" runat="server" Text="Copy translations from one language to another. This is useful for creating variants of the a base language. For example: French (France) and French (Canada)."></asp:Literal></p>
                <fieldset>
                    <legend>Languages to Duplicate</legend>
                    <div class="formrow block twocol">
                        <div class="formcol">
                            <asp:Label ID="lblBaseLanguage" runat="server" AssociatedControlID="lstBaseLanguage" CssClass="block" Text="Base Language"></asp:Label>
                            <asp:ListBox ID="lstBaseLanguage" runat="server" SelectionMode="Single"
                                Rows="10" Width="100%"></asp:ListBox>
                        </div>
                        <div class="formcol">
                            <asp:Label ID="lblDestinationLanguage" runat="server" AssociatedControlID="lstDestinationLanguage" CssClass="block" Text="Destination Language"></asp:Label>
                            <asp:ListBox ID="lstDestinationLanguage" runat="server" SelectionMode="Single" 
                                Rows="10" Width="100%"></asp:ListBox>
                        </div>
                        <asp:CustomValidator ID="vldLanguages" runat="server" ErrorMessage="" CssClass="error" ValidationGroup="startcopy"
                            OnServerValidate="vldLanguages_ServerValidate" Display="Dynamic" ValidateEmptyText="true"></asp:CustomValidator>
                    </div>
                </fieldset>
                <fieldset class="autowidth">
                    <legend>Options</legend>
                    <label class="block"><asp:Literal ID="litIfExists" runat="server" Text="If a translation into the destination language already exists"></asp:Literal></label>
                    <asp:RadioButtonList ID="radIfExists" runat="server" RepeatLayout="Flow" 
                        CssClass="checks applicationChecks plain">
                        <asp:ListItem Value="leave" Text="Leave the existing translation" Selected="True"></asp:ListItem>
                        <asp:ListItem Value="overwrite" Text="Overwrite the translation with the one from the base language"></asp:ListItem>
                    </asp:RadioButtonList>
                </fieldset>
                <div class="actions">
                    <asp:Button ID="btnCopyTranslations" runat="server" Text="Copy Translations" ValidationGroup="startcopy" CssClass="uniformbutton doublewidth btnCopy"
                        OnClick="btnCopyTranslations_Click" />
                </div>
            </asp:View>
            <asp:View ID="viwSummary" runat="server">
                <asp:Panel ID="pnlSuccess" runat="server" CssClass="successDiv" HorizontalAlign="Left">
                    <h2>Completed</h2>
                    <asp:PlaceHolder ID="plcSuccess" runat="server"></asp:PlaceHolder>
                </asp:Panel>
                <asp:Panel ID="pnlError" runat="server" CssClass="errorDiv" HorizontalAlign="Left">
                    <h2>Error</h2>
                    <asp:PlaceHolder ID="plcErrors" runat="server"></asp:PlaceHolder>
                </asp:Panel>
            </asp:View>
        </asp:MultiView>
    </div>
</asp:Content>

